POV-Ray : Newsgroups : povray.programming : A Proposal for XML POV : Re: A Proposal for XML POV Server Time
29 Jul 2024 00:30:48 EDT (-0400)
  Re: A Proposal for XML POV  
From: pk
Date: 1 Apr 2000 16:12:21
Message: <38E666E0.4DD2693B@videotron.ca>
Peter J. Holzer wrote:
> 
> On Thu, 30 Mar 2000 21:39:58 -0500, pk wrote:
> >[snip]
> >What do you actually propose???
> >that instead of declaring
> >sphere{
> >...}
> >
> >we do:
> ><primitive
> > <sphere
> >  Location="12,34,56"
> >  <Texture
> >   <checkered color1=1,.5,1 color2=1,.6,.4>
> >   <transformation>
> >    <rotate 10,0,0>
> >   </tranformation>
> >   >
> >  >
> > >
> 
> That's not XML. It would look more like
> 
> <sphere location="12,34,56" radius="1">
>   <texture>
>     <checker>
>       <color rgb="1,.5,1" />
>       <color rgb="1,.6,.4" />
>     </checker>
>     <rotate><x>10</x></rotate>
>   </texture>
> </sphere>
same idea: cumbersome  8) 
> Note that the distinction between elements and attributes is pretty
> arbitrary. When designing a DTD you would have to put some thought into
> deciding whether it should be
> 
> <sphere location="12,34,56" radius="1" />
there a > and a < missing
> 
> or
> 
> <sphere>
>   <location>
>     <vector>
>       <x> 12 </x>
>       <y> 34 </y>
>       <z> 56 </z>
>     </vector>
>   </location>
>   <radius> 1 </radius>
> </sphere>
> 
> or something in between.
> 
> >(which is pretty structured, compared to what i have seen in web
> >pages)??
> 
> Most web pages aren't even syntactically correct (Try to point
> http://validator.w3.org at some randomly chosen web pages), HTML allows
> various shortcuts, and - most importantly - it is meant for marking up
> text, not describing a data structure.
lol...
> >Definition language weren't made to support imbricked things/tags that
> >work only in another tag
> 
> It does. In HTML, for example, a <title> element can only occur inside a
> <head> element.
That's not what i meant, sorry...
I meant that there isn't a tag(transformations come to mind) that work
different way depending of the tag in which it's imbricked...

Anyway, i'd be happier if instead of only having predefined shapes, you
could extend the language with an interpreted language ala java, where
there is, say:
Primitive.Class
  |
  |-cube
  |
  |-cone
  |
  |-plane
 ...
Where the primitive class contains everything you need to define an
object, except the function that defines the object in itself(it parses
everything and calls the good function in the class)
Like, put the result in a public array in the same format the current
rendered uses, and then povray only has to render the everything in the
array...

BTW, i think that unreal script(that's what gave me the idea) is a good
example:
on my miserable(& only computer) 686/133mHZ 24MB ram no 3d card, it can
do more than 5 fps, while interpreting all the weapons that i shoot, all
the movement, all the ai(basically, the only thing that's not
interpreted in unreal is the renderer...) AND rendering the game...
IF you take a look, Unreal script is pretty much like Java, except that
you can decompile everything to its UScript source...
It'd pretty much make almost every patch useless, if you give it the
right capabilities...
--
AKA paul_virak_khuong at yahoo.com, pkhuong at deja.com, pkhuong at
crosswinds.net and pkhuong at technologist.com(list not complete)...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.